<script setup>
import "@material/web/iconbutton/icon-button.js";

const props = defineProps(["user"]);
const emit = defineEmits(["edit", "delete"]);
</script>

<template>
  <tr>
    <td>{{ props.user?.id }}</td>
    <td>{{ props.user?.username }}</td>
    <td>
      <md-icon-button @click="$emit('edit', props.user)">
        <md-icon>edit</md-icon>
      </md-icon-button>
      <md-icon-button @click="$emit('delete', props.user)">
        <md-icon>delete</md-icon>
      </md-icon-button>
    </td>
  </tr>
</template>
